/**
  ******************************************************************************
  * @file    PfcDrvParam.h
  * @author  Silan - MC Team
  * @version 1.0.0
  * @date    2017/08/14
  * @brief   PFC Driver Parameter Header File
  * @details None
  * @note    None
  ******************************************************************************
  * @attention
  * THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
  * AS A RESULT, SILAN MICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
  * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
  * CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
  * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
  *
  ******************************************************************************
  * Change History
  * -# 2017/08/14 | v1.0.0 | Wangjianlong | Creat file.
  *
  *
  *
  *
  *
  *
  *
  *
  *
  ******************************************************************************
  */

/*******************************************************************************
 * Define to prevent recursive inclusion
 ******************************************************************************/
#ifndef __PFC_DRV_PARAM_H__
#define __PFC_DRV_PARAM_H__


/*******************************************************************************
 * Include section
 ******************************************************************************/
#include "stdint.h"

/*******************************************************************************
 * Typedefs, structs and enums
 ******************************************************************************/

/**
  * @brief PFC driver parameters structure definition
  */
struct PFC_DRV_PARAM_s{
  uint8_t   u8VacFreq;
  uint16_t  u16PfcPwmFreq;
  float     fPfcMaxIac;
  uint16_t  u16PfcMaxVac;
  uint16_t  u16PfcMaxVdc;
  float     fPfcIacPiKp;
  float     fPfcIacPiKi;
  float     fPfcVdcPiKp;
  float     fPfcVdcPiKi;
  float     fPfcCompGain;
  float     fPfcSmpDelay;
  uint8_t   u8PfcVdcOutDefault;
  uint8_t   u8PfcVdcOutMin;
  uint8_t   u8PfcVdcOutMax;
  uint8_t   u8VdcRampAcc;
  uint8_t   u8VdcRampDec;
  float     fMinOnTimeUS;
  float     fMinOffTimeUS;
  float     fFiltConstIacRms4User;
  float     fFiltConstVacRms4User;
  float     fFiltConstVdcAvg4User;
  uint8_t   u8FiltConstVdcAvg4Ctrl;
  uint8_t   u8VacODVal4Rms;
  uint8_t   u8VacORVal4Rms;
  uint8_t   u8VacUDVal4Rms;
  uint8_t   u8VacURVal4Rms;
  uint8_t   u8VdcODVal4Peak;
  uint8_t   u8VdcORVal4Peak;
  uint8_t   u8VdcOVLVal4Peak;
  uint8_t   u8VdcUDVal4Peak;
  uint8_t   u8VdcURVal4Peak;
  uint8_t   u8IacODVal4Rms;
  uint8_t   u8IacORVal4Rms;
  uint8_t   u8PinODVal4Rms;
  uint8_t   u8PinORVal4Rms;
  uint8_t   u8MaxVoltErr;
};

/*******************************************************************************
 * Prototypes of the functions
 ******************************************************************************/
extern void PfcDrvParamDefault(struct PFC_DRV_PARAM_s *ptr);

#endif /* __PFC_DRV_PARAM_H__ */
/*---------------------------------- End of the file ---------------------------------*/

